package com.mistoplus.sedona.main;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;

import com.mistoplus.sedona.AnswerView;
import com.mistoplus.sedona.BookNow;
import com.mistoplus.sedona.InfoView;
import com.mistoplus.sedona.R;
import com.mistoplus.sedona.VortexMapView;

public class MainMenu extends Activity {

	private ImageView mImvJourney;
	private ImageView mImvCall;
	private ImageView mImvBook;
	private ImageView mImvInfo;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	
	    setContentView(R.layout.main_menu);
	     
	    mImvJourney = (ImageView)findViewById(R.id.imv_journey);
	    mImvCall = (ImageView)findViewById(R.id.imv_call);
	    mImvBook = (ImageView)findViewById(R.id.imv_book);
	    mImvInfo = (ImageView)findViewById(R.id.imv_info);
	    
	    mImvJourney.setOnClickListener(onClickMenuButton);
	    mImvCall.setOnClickListener(onClickMenuButton);
	    mImvBook.setOnClickListener(onClickMenuButton);
	    mImvInfo.setOnClickListener(onClickMenuButton);
	}
	
	private OnClickListener onClickMenuButton = new OnClickListener() {
		
		@Override
		public void onClick(View v) {
			if(v.getId() == R.id.imv_journey){
				Intent intent = new Intent(MainMenu.this, VortexMapView.class);
				startActivity(intent);
			}else if(v.getId() == R.id.imv_call){
				Intent intent = new Intent(MainMenu.this, AnswerView.class);
				startActivity(intent);
			}else if(v.getId() == R.id.imv_book){
				Intent intent = new Intent(MainMenu.this, BookNow.class);
				startActivity(intent);
			}else if(v.getId() == R.id.imv_info){
				Intent intent = new Intent(MainMenu.this, InfoView.class);
				startActivity(intent);
			}
		}
	};
	

}
